package com.s7.network.server;

import java.util.Map;

import io.reactivex.Observable;
import okhttp3.ResponseBody;
import retrofit2.http.HeaderMap;
import retrofit2.http.POST;
import retrofit2.http.Url;

/**
 * 无参POST请求服务
 */
public interface PostServer {

    /**
     * post 请求
     * @param url
     * @return
     */
    @POST
    Observable<ResponseBody> onPost(@Url String url);

    /**
     * post 请求
     * @param url
     * @param headers 请求头
     * @return
     */
    @POST
    Observable<ResponseBody> onPost(@Url String url,
                                    @HeaderMap Map<String, String> headers);
}
